package com.dylan.springcloud.consumerservice.service;

import com.dylan.springcloud.consumerservice.service.impl.UserServiceFallback;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by Dylan on 2018/10/18.
 */
@FeignClient(name = "sc-client-service", fallback = UserServiceFallback.class)
public interface UserService {

    @RequestMapping(value = "/user/get/{username}", method = RequestMethod.GET)
    String getUser(@PathVariable("username") String username) ;

}
